package com.xuecheng.teaching.api;

import com.xuecheng.commons.model.dto.PageRequest;
import com.xuecheng.commons.model.dto.WorkChaDto;
import com.xuecheng.commons.model.dto.WorkDto;
import com.xuecheng.commons.model.vo.ResponseResult;
import com.xuecheng.commons.model.vo.WorkVo;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

@FeignClient("xc-teaching-service")
public interface WorkClient {
    //根据id查作业
    @GetMapping("/work/{workId}")
    public ResponseResult<WorkVo> findById(@PathVariable("workId") Long workId);
    //作业添加和修改
    @PostMapping("/work")
    public ResponseResult<WorkVo> savework(@RequestBody WorkDto dto);

}
